package com.easonji.common.base.response;

import java.io.Serializable;

/**
 * @ClassName: ResponseResult
 * @Description: 接口统一返回
 * @Author: LiuJun
 * @date: 2018/07/22 09:59
 * @Version: 1.0
 * @Copyright: Copyright (c) 2018 - 2019
 */
public class Response implements Serializable {

    private static final long serialVersionUID = 3979109759888275617L;

    /**
     * 响应结果
     */
    private Boolean success;

    /**
     * 响应code
     */
    private Integer code;

    /**
     * 响应消息
     */
    private String message;

    /**
     * 响应数据
     */
    private Object data;

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "{\"success\":\"" + success + "\",\"code\":\"" + code + "\",\"message\":\"" + message + "\",\"data\":\""
                + data + "\"} ";
    }
}
